home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 8: LINUX Games
/
Linux Cubed Series 8 - LINUX Games.iso
/
games
/
x11
/
rpg
/
crossfir.001
/
crossfir~
/
eutl
/
DOC
< prev
next >
Wrap
Text File
|
1995-10-29
|
1KB
|
24 lines
This is partial documentation on some of the functions. I figured I should
at least write down what I have figured out the different functions do:
WaitForInput( TcpSocket *socks, int nsocks, long msTimeout)
This function processes the sockets - socks is an array, with nsocks
containing the number of active elements. This function will go
through and do all the selects and other low level stuff on the sockets.
It also updateds numerous flags, including the input flag that HasInput uses.
HasInput(TcpSocket sock): This returns true if the socket has input waiting
- note that is is actually information that is stored in sock's buffer.
WaitForInput updates this value - thus it will still return true even after
reading the data out until another WaitForInput has been called.
Unfortunately, there does not seem to be any way to tell if all the
information has been processed short of calling WaitForInput and HasInput
again.
Arg* functions: They create an arbitrary long list, that can then be
sent over the connection. Unforunately, there is a fair amount of cpu overhead
on all of these functions (because each time you use an add function, it
does another malloc). Also, note that everything sent also has a 4 byte
length indicator to it. Thus, while the data may only be 4 bytes, 4 bytes
more get added to it for the length,